'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/api/banner', controller.home.banner);
  router.get('/api/menu', controller.home.menu);
  router.get('/api/tabmenu', controller.home.tabmenu);

  router.get('/api/info', controller.user.info);
  router.get('/api/msg_code', controller.user.message_code);
  router.post('/api/login', controller.user.login);

  router.get('/api/products', controller.product.list);
  router.get('/api/classify', controller.product.classify);
};
